<?php
	session_start();
	include("checkProfile.php");
	include("fetchData.php");
	
	$data=fetchAccountDetails();	
	
	if($clean){
		modifyaccount($data['account_id'], $_POST['email'], $_POST['usr'],$_POST['pwd'], $_POST['fname'], $_POST['mname'], $_POST['lname'], $_POST['sex'], 
			          $birthday, $_POST['num'],  $_POST['country'], $_POST['city'], $_POST['municipality'], $_POST['street']);
		mysql_close();
		header("Location: accountSettingsP.php");
	} else {
		echo $error;
		echo "<br/><a id=\"close\" onClick=\"history.back()\" style=\"text-decoration:underline; color:#03F\" onMouseOver=\"document.getElementById('close').style.cursor='pointer'\">Click here to return to your form</a></div>";
	}
?>